package com.fp.m7.shared;

import com.google.gwt.core.client.GWT;

/**
 * Constants, urls, defaults.
 * 
 * @author 7
 */
public class Constants {

    public static final int MAX_COMMENTS_PER_PAGE = 12;

    public static final int MAX_RANDOM_USERS_TO_FIND = 20;
    public static final int RANDOM_USERS_COUNT = 7;

    public static String SECURED_URL;
    static {
        SECURED_URL = GWT.getHostPageBaseURL()
                + (GWT.isProdMode() ? "M7Secured.html" : "M7Secured.html?gwt.codesvr=127.0.0.1:9997");
    }

    public static final String DEFAULT_AVATAR_URL = GWT.getHostPageBaseURL() + "images/default-user.jpg";

    public final static String[] AVATAR_VALID_EXTENSIONS = { "bmp", "jpg", "jpeg", "png" };
    public final static String AVATAR_UPLOAD_URL = GWT.getHostPageBaseURL() + "M7Secured/upload/";

    public static final String CAPTCHA_URL = GWT.getHostPageBaseURL() + "captcha/SimpleCaptcha.jpg";

    public static final String LOG_IN_URL = GWT.getHostPageBaseURL() + "LogMeIn";
    public static final String LOG_OUT_URL = GWT.getHostPageBaseURL() + "LogMeOut";
    public static final String LOGIN_FORM_USERNAME_NAME = "j_username";
    public static final String LOGIN_FORM_PASSWORD_NAME = "j_password";

    public static final String SESSION_COOKIE = "JSESSIONID";
}
